<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>后台项目</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
        crossorigin="anonymous">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
        integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
        crossorigin="anonymous"></script>
    <link rel="stylesheet" href="main.css">

    <!-- 17软件2班 施文森 1705050208  -->


</head>

<body>
    <div class="header">

        <nav class="navbar navbar-default" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">后台管理系统</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav">

                    <li><a href="#"><span class="glyphicon glyphicon-home"></span> 后台首页</a></li>

                    <li><a href="#"><span class="glyphicon glyphicon-user"></span> 用户管理</a></li>

                    <li class="active"><a href="#"><span class="glyphicon glyphicon-list-alt"></span> 内容管理</a></li>

                </ul>

                <ul class="nav navbar-nav navbar-right">

                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">admin <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#"><span class="glyphicon glyphicon-screenshot"></span> 前台首页</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-user"></span> 个人主页</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-cog"></span> 个人设置</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-credit-card"></span> 账户中心</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-heart"></span> 我的收藏</a></li>
                        </ul>
                    </li>
                    <li><a href="#"> 退出</a></li>
                </ul>
            </div>
        </nav>
    </div>

    <div class="container">
        <!-- 左侧目录 -->
        <div class="row">
            <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2">

                <ul class="list-group">
                    <a class="list-group-item active" href="#">内容管理</a>
                    <a class="list-group-item" href="#">添加内容</a>
                </ul>

            </div>

            <!-- 右侧目录 -->

            <div class="col-xs-12 col-sm-10 col-md-10 col-lg-10">

                <div class="panel panel-default">

                    <div class="panel-heading">
                        <h1>管理内容</h1>
                        <ul id="myTab" class="nav nav-tabs" role="tablist">
                            <li class="active"><a href="#bulletin" role="tab" data-toggle="tab">内容管理</a></li>
                            <li><a href="#rule" role="tab" data-toggle="tab">添加内容</a></li>

                        </ul>
                        <!-- 选项卡面板 -->
                        <div id="myTabContent" class="tab-content">
                            <div class="tab-pane active" id="bulletin">
                                <!-- Table -->
                                <table class="table">
                                    <thead>
                                        <tr>
                                            <th>文章标题</th>
                                            <th>作者</th>
                                            <th>发布时间</th>
                                            <th>操作</th>
                                        </tr>

                                    </thead>
                                    <tbody>
                                        <tr>
                                            <th scope="row">国内首个汽车资讯互动平台诞生</th>
                                            <td>皮皮虾</td>
                                            <td>2018/10/20</td>
                                            <td>
                                                <div role="presentation" class="dropdown">

                                                    <button class="btn btn-default dropdown-toggle data-toggle"
                                                        data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
                                                        aria-expanded="false">操作
                                                        <span class="caret"></span>

                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li><a href="#">编辑</a></li>
                                                        <li><a href="#">删除</a></li>
                                                        <li><a href="#">全局置顶</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th scope="row">爱奇艺10亿元资金成立创投联盟</th>
                                            <td>皮皮虾</td>
                                            <td>2018/10/20</td>
                                            <td>
                                                <div role="presentation" class="dropdown">

                                                    <button class="btn btn-default dropdown-toggle data-toggle"
                                                        data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
                                                        aria-expanded="false">操作
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li><a href="#">编辑</a></li>
                                                        <li><a href="#">删除</a></li>
                                                        <li><a href="#">全局置顶</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th scope="row">国内首个汽车资讯互动平台诞生</th>
                                            <td>皮皮虾</td>
                                            <td>2018/10/20</td>
                                            <td>
                                                <div role="presentation" class="dropdown">

                                                    <button class="btn btn-default dropdown-toggle data-toggle"
                                                        data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
                                                        aria-expanded="false">操作
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li><a href="#">编辑</a></li>
                                                        <li><a href="#">删除</a></li>
                                                        <li><a href="#">全局置顶</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th scope="row">国内首个汽车资讯互动平台诞生</th>
                                            <td>皮皮虾</td>
                                            <td>2018/10/20</td>
                                            <td>
                                                <div role="presentation" class="dropdown">

                                                    <button class="btn btn-default dropdown-toggle data-toggle"
                                                        data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
                                                        aria-expanded="false">操作
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li><a href="#">编辑</a></li>
                                                        <li><a href="#">删除</a></li>
                                                        <li><a href="#">全局置顶</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th scope="row">国内首个汽车资讯互动平台诞生</th>
                                            <td>皮皮虾</td>
                                            <td>2018/10/20</td>
                                            <td>
                                                <div role="presentation" class="dropdown">

                                                    <button class="btn btn-default dropdown-toggle data-toggle"
                                                        data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
                                                        aria-expanded="false">操作
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li><a href="#">编辑</a></li>
                                                        <li><a href="#">删除</a></li>
                                                        <li><a href="#">全局置顶</a></li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>



                                    </tbody>

                                </table>
                            </div>
                            <div class="tab-pane" id="rule">
                                <h1>添加文章标题</h1>
                                <div class="input-group input-group-lg">            
                                    <span class="input-group-addon" id="sizing-addon1">标题</span>
                                    <input type="text" class="form-control" placeholder="请输入文章标题" aria-describedby="sizing-addon1">
                                </div>

                                <div class="input-group input-group-lg">            
                                        <span class="input-group-addon" id="sizing-addon1">作者</span>
                                        <input type="text" class="form-control" placeholder="请输入作者名字" aria-describedby="sizing-addon1">
                                    </div>
                                    <div class="input-group input-group-lg">            
                                            <span class="input-group-addon" id="sizing-addon1">内容</span>
                                            <input type="text" class="form-control" placeholder="请输入内容" aria-describedby="sizing-addon1">
                                        </div>
                            </div>


                        </div>

                    </div>


                </div>
                <ul class="pagination" id="right">
                    <li><a href="#">&laquo;</a></li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li><a href="#">&raquo;</a></li>
                </ul>
            </div>
        </div>

    </div>
    <footer>

        <div class="container">

            <div class="row">

                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="juzhong">
                    <p>2017-2018 www.newsmile.com 京ICP备 11427030 号-9</p>
                </div>

            </div>

        </div>

    </footer>
</body>
<script>
    $(function () {
        $('.list-group a').on('mouseover', function () {
            $(this).addClass('active');
            $(this).siblings().removeClass('active') //siblings()函数控制除了被选中的同级元素以为的a链接  然后用removeClass（）函数清除
        })

    })
    $(function () {
        $("#myTab a").click(function (e) {
            e.preventDefault();
            $(this).tab("show");
        });
    })
</script>

</html>